package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI;

import android.os.Bundle;
import android.view.Window;

import com.google.android.material.bottomnavigation.BottomNavigationView;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);
        //底部按钮绑定
        BottomNavigationView navview = findViewById(R.id.nav_view);
        NavController navController = Navigation.findNavController(MainActivity.this,R.id.fra_home);
        NavigationUI.setupWithNavController(navview,navController);
        //
    }
}
